/**
 * $Id: TestEngineer.java 80 2012-12-13 16:33:00Z Denis.Skalsky@gmail.com $S
 */
package com.globallogic.skalskyy.javabasic.valstaff;

/**
* TestEngineer stores info of software tester.
* @author $Author: Denis.Skalsky@gmail.com $
* @version $Revision: 80 $
 */
public class TestEngineer extends Employee {

	/** Type of tester */
	private String type;

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
	
	@Override
	public boolean equals(Object obj) {
		if (super.equals(obj)) {
			TestEngineer tester = (TestEngineer)obj;
			return (this.compareType(tester.getType()));
		} else {
			return false;
		}
	}
	
	/**
	 * Check tester type for a match ignoring case
	 * @param type type for checking 
	 * @return true if matches else false
	 */
	public boolean compareType(String type) {
		return this.getType().equalsIgnoreCase(type);
	}
}
